﻿using Eassets.Layered.Domain.Asset;
using Eassets.Data.Asset;
using System.Collections.ObjectModel;

namespace Eassets.Service.Asset
{
    public class AssetDisposalDetailsService
    {
        FixedAssetDisposalDetailsData fixedAssetDisposalDetailsdata = new FixedAssetDisposalDetailsData();

        /// <summary>
        /// Inserts fixedAssetDisposalDetails.
        /// </summary>
        /// <param name="fixedAssetDisposalDetails"></param>
        public void AddFixedAssetDisposalDetails(AssetDisposalDetails fixedAssetDisposalDetails)
        {
            if (fixedAssetDisposalDetails != null)
            {
                fixedAssetDisposalDetailsdata.AddFixedAssetDisposalDetails(fixedAssetDisposalDetails);
            }
        }

        /// <summary>
        /// Updates fixedAssetDisposalDetails.
        /// </summary>
        /// <param name="fixedAssetDisposalDetails"></param>
        public void ModifyFixedAssetDisposalDetails(AssetDisposalDetails fixedAssetDisposalDetails)
        {
            if (fixedAssetDisposalDetails != null)
            {
                fixedAssetDisposalDetailsdata.ModifyFixedAssetDisposalDetails(fixedAssetDisposalDetails);
            }
        }

        /// <summary>
        /// Delete fixedAssetDisposalDetails.
        /// </summary>
        /// <param name="fixedAssetDisposalDetailsId"></param>
        public void DeleteFixedAssetDisposalDetails(long fixedAssetDisposalDetailsId)
        {
            if (fixedAssetDisposalDetailsId != 0)
            {
                fixedAssetDisposalDetailsdata.DeleteFixedAssetDisposalDetails(fixedAssetDisposalDetailsId);
            }
        }

        /// <summary>
        /// GetbyId fixedAssetDisposalDetails.
        /// </summary>
        /// <param name="fixedAssetDisposalDetailsId"></param>
        /// <returns></returns>
        public AssetDisposalDetails GetByIdFixedAssetDisposalDetails(long fixedAssetDisposalDetailsId)
        {
            return fixedAssetDisposalDetailsdata.GetByIdFixedAssetDisposalDetails(fixedAssetDisposalDetailsId);
        }

        /// <summary>
        /// GetAll fixedAssetDisposalDetails.
        /// </summary>
        /// <returns></returns>
        public Collection<AssetDisposalDetails> GetAllFixedAssetDisposalDetails()
        {
            return fixedAssetDisposalDetailsdata.GetAllFixedAssetDisposalDetails();
        }

        public Collection<AssetItemDetails> GetFixedAssetItemDetailsByAssetId(long assetId)
        {
            return fixedAssetDisposalDetailsdata.GetFixedAssetItemDetailsByAssetId(assetId);
        }
    }
}
